
<?php
$currentFile = $_SERVER["PHP_SELF"];
$parts = Explode('/', $currentFile);
$currentFile = $parts[count($parts) - 1];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<title>LazySwim - General Info</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="style_ie.css" /><![endif]-->
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="style_ie6.css" /><![endif]-->
</head>
<body>
<div id="page">
    <div id="page-top">
        <div id="page-bottom">
          <div id="header">
                <div id="header-info">
                    <h1>LAZYSWIM</h1>
                    <div class="description">Simplistic Swim System</div>
                </div>
                <div id="header-menu">
                    <ul>
                        <li class="page_item"><a href="index.php">Home</a></li>
                        <li class="current_page_item"><a href="generalinfo.php">General Info</a></li>
                        <li class="page_item"><a href="aboutteam.php">About Team</a></li>
                        <li class="page_item"><a href="programs.php">Programs</a></li>
                        <li class="page_item"><a href="meetsandevents.php">Meets and Events</a></li>
                        <li class="page_item"><a href="digitalmedia.php">Digital Media</a></li>
                    </ul>
                </div>
                <div id="header-date">Today is <?php echo date('l, F jS, Y'); ?></div>
                <div id="header-cats">
                    <ul>
                        <li class="cat-item"><a href="login-public.php">Swimmer/Parent Login</a></li>
                        <li class="cat-item"><a href="login-manager.php">Manager Login</a></li>
                    </ul>
                </div>
            </div>
            <div id="main">

                <div id="sidebar">
                    <?php
					// include the corresponding navigation page
                    include("navigation-public.php");
					?>     
                </div>

<!-- main body -->

                <div class="featured-post">
                    <div class="post-title">
                        <h2>General Information</h2>
                        <div class="post-title-info">
                            <div class="post-comments"><a href="editpage.php?page=<?php
echo $currentFile;
?>">Edit This Page <?php
echo $currentFile;
?></a> - THIS NEEDS TO BE VISIBLE ONLY IF LOGGED IN AS MANAGER</div>
                        </div>
                    </div>
                    <div class="post-entry">
					<?php
					require("includes/dbInfo.php");
					
					$page_sql = mysql_query("SELECT html from htmlPages where url = '$currentFile'") 
						or die(mysql_error());
							
					//display HTML code stored in database for this page
					while( $row = mysql_fetch_array($page_sql)) {
						echo $row[html];
					}
					?>
                    </div>
                </div>

<!-- end of one post -->

             
                <div class="clear"></div>

            </div>
            <div id="footer"> Copyright 2011 - All Rights Reserved<br />
                Designed by <a href="http://wpjunction.com/">HPA</a> // CMPUT 410 Project by Kim Beaudin, Raymond Ta, Frederick Vuong, Ashton Wong<br />
                Valid XHTML and CSS </div>
        </div>
    </div>
</div>
</body>
</html>
